using ConsoleApi.Models;

namespace ConsoleApi.Services.Interfaces;

/// <summary>
/// 生产数据服务接口
/// </summary>
public interface IProductionDataService
{
    /// <summary>
    /// 获取生产活动列表
    /// </summary>
    /// <param name="activityType">活动类型</param>
    /// <returns>生产活动列表</returns>
    Task<List<ProductionActivity>> GetProductionActivitiesAsync(string activityType);
    
    /// <summary>
    /// 获取生产统计数据
    /// </summary>
    /// <param name="city">城市名称</param>
    /// <param name="date">日期</param>
    /// <returns>生产统计数据</returns>
    Task<ProductionStatistics> GetProductionStatisticsAsync(string city, DateTime date);
    
    /// <summary>
    /// 更新生产活动状态
    /// </summary>
    /// <param name="activityId">活动ID</param>
    /// <param name="status">状态</param>
    /// <returns>更新结果</returns>
    Task<bool> UpdateActivityStatusAsync(string activityId, string status);
}

/// <summary>
/// 生产统计数据模型
/// </summary>
public class ProductionStatistics
{
    public string City { get; set; } = string.Empty;
    public DateTime Date { get; set; }
    public int TotalActivities { get; set; }
    public int CompletedActivities { get; set; }
    public int DelayedActivities { get; set; }
    public double Efficiency { get; set; }
    public List<string> WeatherImpacts { get; set; } = new();
} 